package jdly.water.api.service.system;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import jdly.water.api.dao.system.UserDAO;
import jdly.water.entity.system.TUser;
@Service
public class UserInfoService {

	@Autowired
	private UserDAO userDao;
	
	public TUser findByUsername(String username) {
		List<TUser> userlist = userDao.findByUsername(username);
		if (userlist.isEmpty()) {
			return null;
		} else {
			return userlist.get(0);
		}
	}
}
